// ml:run = $bin < input
#include <iostream>
#include <iomanip>
#include <cmath>

int main()
{
    std::ios_base::sync_with_stdio(false);
    double h1, t1, h2, t2;
    std::cin >> h1 >> t1;
    std::cin >> h2 >> t2;
    double h = std::sqrt(h1 / h2);
    double ans = h * t2 - t1;
    ans /= h - 1.0;
    std::cout << std::fixed << std::setprecision(10) << ans << "\n";
}

